<style>
    #d {
        display: table-cell;
        vertical-align: middle;
        height: 200px;
    }
    
    div {
        border: solid 1px lightskyblue;
    }
</style>

<div id="d">
    <img src="https://how2j.cn/example.gif">
</div>